import Layout from '@/views/layout/index'

const contractRouter = {
    path: '/contract',
    name: 'contract',
    component: Layout,
    meta: {
        title: '合同管理',
        icon: 'iconfont icon-contract'
    },
    redirect: "/contract/manage",
    children: [{
        path: 'manage',
        name: 'contractManage',
        component: () => import('@/views/contract/manage'),
        meta: {
            title: '合同管理',
            api: ['contract'],
            icon: 'iconfont icon-contract',
            authority: ['count'],
        },
        checkedList: [],
        rights: [{
                value: 'count',
                label: '统计'
            },{
                value: 'list',
                label: '列表'
            },{
                value: 'own',
                label: '只看自己'
            },{
                value: 'create',
                label: '添加'
            },{
                value: 'details',
                label: '详情'
            },{
                value: 'edit',
                label: '编辑'
            },{
                value: 'delete',
                label: '删除'
            }]
    },{
        path: 'contractList',
        name: 'contractList',
        component: () => import('@/views/contract/contractList'),
        hidden: true,
        meta: {
            title: '合同列表',
            api: ['contract'],
            authority: ['list'],
        }
    },{
        path: 'contractDetails',
        name: 'contractDetails',
        component: () => import('@/views/contract/contractDetails'),
        hidden:true,
        meta: {
            title: '合同详情',
            api: ['contract'],
            authority: ['create','edit','details'],
        }
    },{
        path: 'contractType',
        name: 'contractType',
        component: () => import('@/views/contract/contractType'),
        meta: {
            title: '合同类型',
            api: ['contract_type'],
            authority: ['list'],
        },
        checkedList: [],
        rights: [{
                value: 'list',
                label: '列表'
            },{
                value: 'create',
                label: '添加'
            },{
                value: 'details',
                label: '详情'
            },{
                value: 'edit',
                label: '编辑'
            },{
                value: 'delete',
                label: '删除'
            }]
    },{
        path: 'contractTypeDetails',
        name: 'contractTypeDetails',
        component: () => import('@/views/contract/contractTypeDetails'),
        hidden:true,
        meta: {
            title: '合同类型详情',
            api: ['contract_type'],
            authority: ['create','edit','details'],
        }
    }]
}

export default contractRouter